package com.vrv.vap.baseline.service.impl;

import com.vrv.vap.baseline.config.ExcelTemplateConfig;
import com.vrv.vap.baseline.entity.ActReProcdef;
import com.vrv.vap.baseline.mapper.ActReProcdefMapper;
import com.vrv.vap.baseline.service.AbstractExcelExportService;
import com.vrv.vap.baseline.util.FileOperationUtil;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

@Service
public class ActReProcdefExportService extends AbstractExcelExportService<ActReProcdef> {
    private final ActReProcdefMapper actReProcdefMapper;

    public ActReProcdefExportService(FileOperationUtil fileOperationUtil,
                                    ExcelTemplateConfig excelTemplateConfig,
                                    ActReProcdefMapper actReProcdefMapper) {
        super(fileOperationUtil, excelTemplateConfig, "act_re_procdef");
        this.actReProcdefMapper = actReProcdefMapper;
    }

    @Override
    protected List<ActReProcdef> getAllData() {
        return actReProcdefMapper.selectAll();
    }

    @Override
    protected void processData(List<ActReProcdef> dataList, String format) throws IOException {
        // 如果需要对数据进行处理，可以在这里实现
    }

    @Override
    protected Class<ActReProcdef> getEntityClass() {
        return ActReProcdef.class;
    }
}